import { createStore } from 'vuex'
function getSys() {
	try {
		return JSON.parse(localStorage.getItem('user'))
	} catch (error) {
		return {}
	}
}
export default createStore({
	state: {

		sys: {
			page: [],
			user: getSys()
		}
	},
	mutations: {
		increment(state, payload) {
			// 变更状态

			const { user, page } = payload
			console.log(user, page, '2')
			state.sys = payload
			state.page = page
			localStorage.setItem("user", JSON.stringify(user))
		}
	},
	actions: {},
	modules: {}
})




// export default store
